import React,{useState,useEffect} from 'react'
import ReactDOM from 'react-dom'

const FormApi = {}
window.FormApi = FormApi
 function Form() {
    // 1. Use the name state variable
    const [name, setName] = useState('Mary');
    const [age, setAge] = useState('10');
    FormApi.setName = setName
    FormApi.setAge = setAge
    // 2. Use an effect for persisting the form
    useEffect(function persistForm() {
      console.warn(name)
    },[age]);
  

  }
  export default Form

